/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package paperrockscissor;

/**
 *
 * @author REM
 */
public class PaperRockScissor {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
    }
    
    public PaperRockScissor() {
		
    }
    
    public Result play(PRSEnum p1, PRSEnum p2)
	{
		Result r = Result.LOST;

		switch (p1) {
		case PAPER:
			switch (p2) {
			case PAPER:
				r = Result.TIE;
				break;
			case ROCK:
				r = Result.WIN;
				break;
			case SCISSORS:
				r = Result.LOST;
				break;

			default:
				break;
			}

			break;
		case ROCK:
			switch (p2) {
			case ROCK:
				r = Result.TIE;
				break;
			case PAPER:
				r = Result.LOST;
				break;
			case SCISSORS:
				r = Result.WIN;
				break;
			default:
				break;
			}
		case SCISSORS:
			switch (p2) {
			case SCISSORS:
				r = Result.TIE;
				break;
			case PAPER:
				r = Result.WIN;
				break;
			case ROCK:
				r = Result.LOST;
				break;
			default:
				break;
			}
		default:
			break;
		}

		return r;
	}

}
